﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using DTO;
using DAO;

namespace BUS
{
    public class BoPhanService
    {
        public static List<BoPhanDTO> LayDanhSachBoPhan()
        {
            List<BoPhanDTO> listBoPhanDTO = new List<BoPhanDTO>();
            try
            {
                BoPhanRepository bophanDAO = new BoPhanRepository();
                listBoPhanDTO = bophanDAO.LayDanhSachBoPhan();
            }
            catch (System.Exception)
            {
            }
            return listBoPhanDTO;
        }

        public static BoPhanDTO LayThongTinBoPhan(int maBP)
        {
            BoPhanDTO bpDTO = new BoPhanDTO();
            try
            {
                BoPhanRepository bpDAO = new BoPhanRepository();
                bpDTO = bpDAO.LayThongTinBoPhan(maBP);
            }
            catch (System.Exception)
            {
            }
            return bpDTO;
        }
    }
}
